#!/bin/sh
vers=1.4
#
# ma
# echo "EZ Do $vers started..."
echo "debug: $0,$1,$2,$3,$4"


#ez httpx://thunder[var1]/hash-value[var2]

var1=`echo $1 | awk -F'[/:]' '{print $4;}'`
var2=`echo $1 | awk -F'[/:]' '{print $5;}'`


echo "var1:$var1"
echo "var2:$var2"


case $var1 in
thunder)
echo "thunder: $0,$1,$2,$3,$4"
export LD_LIBRARY_PATH=/opt/apps/com.xunlei.download/files:$LD_LIBRARY_PATH
/opt/apps/com.xunlei.download/files/thunder -start $var2
;;
edge)
echo "edge: $0,$1,$2,$3,$4"
;;
*)
echo "*: $0,$1,$2,$3,$4"

;;
esac



function pause(){
        read -n 1 -p "$*" INP
        if [ $INP != '' ] ; then
                echo -ne '\b \n'
        fi
}
 
#使用时：
pause 'Press any key to continue...'


